#ifndef _ASSERT_H
#define _ASSERT_H
#include "sbi.h"
#include "tinyprintf.h"

#define assert(exp)                                                            \
  do {                                                                         \
    if ((exp) == 0) {                                                          \
      tfp_printf("[ipi]: error while checking " #exp " in " __FILE__ ": %d\n", \
                 __LINE__);                                                    \
      SBI_ECALL_0(SBI_SHUTDOWN);                                               \
    }                                                                          \
  } while (0);

#endif // _ASSERT_H
